import requests
from bs4 import BeautifulSoup

cookies = {
    'www51cto': '4A4B86D7C7F08404D8147152B69DD1C7wPlU',
    'tfstk':'eJJBWFY2vy4QkQP352iwftcD2gCAGQ9I3OEWmnQzL7Bp58TDc_Fd92jJPNTl86WdpawW5ndF493HP8KWqB7pzDbRyFLNJH-rr8ZRKdRUUwuhF3LVFquq3x-HxsX-uq5wbtAAEweNYsH2xHqTAzn26xy7uCPNDycYMJhk0VN8N8UQZIpnQGe9QM1CP873F_pQ36bvvNw-kdsB-ZKd58eP4N2VlI0_NfMUFG_qfcNuZyekxYGKPmvV9GjIuci_-7fdjGtKfcNop6IGbQmsfSBc.',
    'ssxmod_itna':'iqmx2DuDgDcB0=D7Dz=QTweGq0IBiODOBrkRwxqGNwWDZDiqAPGhDC8bziw+Y+Gre=NWPe2esM7c+G3s4OZTwf5CW=G+hdDU4i8DCqxxmWDem=D5xGoDPxDeDADYEXDAqiOD7qDdUEwNNBDi3Db2=Df4DmDGYyiqDgDYQDGqIUD7QDIu65m06PMS2MUjteFWdyD0UQxBdK7=4yIjcHwAXP=adOi0DDCo+z=Y4srDhsYWPnDB=pxBjlUuXXUjyB/TN4r8DvK7+zQOMq4RqiBDq4nAh+dI4jeo4tDrxP07+WAY4DGbBdSFqxD=',
    'reg_sources':'edu',
    'acw_tc':'2760823117086122202675269e3ef41030b43f2a1e8caca4bb0dba974efb5f',
    'PHPSESSID':'hb9f89gkf3u7e5tb68inrfa05e',
    'ssxmod_itna2':'iqmx2DuDgDcB0=D7Dz=QTweGq0IBiODOBrkRwxA6WqItwxtD/zzBDFhE//xgrrqwOY0xApxyQQnYRQRKGjYwmqaCLBwmNmxM3hj8+B2Gjwy+CkiOqvTb9Q8v0TfEQhmWphK2=tkrzvbNpIFqRKQp=ieFaexC09xsEFwAaeso7HFIo7wr1gFPO012=TrBe5AwF7w6o5kBYBvP9px8QkFOmHdU=dtFgW4gm5xyhMFTrfQe0vpFCq4tjBQctaA/38+y7k171qx=riO9z0fwqOBh+9HUaIawjfxfwkE3puv+M=jGfszPOP2LSs54W9fFpukHfWBGCRoiPQaoO343tyMbqmdB2oa4irY4S2dgEbHlth3NlONfr+P83oWKTEokxQu4=V88=r+k23NWKFEICotA+d5Sz++3gx5MC3BCiSTOebijOEyEouDod=tPStx8K+Q5Q0EoLLi=wY7=68df4KkELdujj4rpl6pf8x8djx=QixUmicozyBH9PHPCKZjiYDb/exyxxea+dcDVRvQn73TLyTv8dPD7QtADNuB0gyKlRtn5NLDidnVSGnW8tnHnlYnewM0xtBqc7GHgH8uwxDGcDG7zQ4eYXX/LSIDevxdSLrYxdkrSZqDrN5FNmiDD',
    'once_p':'1b6f67',
    'pub_cookietime':'2592000',
    'pub_auth_profile':'zYLcR2%2B1pfGSRocJUDcOzefiQ3go72uTn94je9FIdbg%3D',
    'sensorsdata2015jssdkcross':'%7B%22distinct_id%22%3A%2216077605%22%2C%22first_id%22%3A%2218db1016fded8a-009f8dcbadc93a-610a5c50-2359296-18db1016fdfa67%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%2C%22%24latest_utm_medium%22%3A%22navigationpublish%22%7D%2C%22%24device_id%22%3A%2218db1016fded8a-009f8dcbadc93a-610a5c50-2359296-18db1016fdfa67%22%7D',
    'pub_sauth1':'DAYPUFFTDlJRVgYCAQlfPQUFBFNRBAUEa1IAVA1UVQVWVQg',
    'acw_tc':'276077b417086119792772613eee3c701b86f3cb1935743adf99d55e6f0197',
    'pub_wechatopen':'aG0wVVJVD1IEBQUAUg',
    'pub_sauth2':'6afc234663de8cb85569e48b70308704'
}

# 目标URL
url = 'https://t.51cto.com/user/score_id-4621730.html?type=1&train_id=1279'

# 发送HTTP请求
response = requests.get(url, cookies=cookies)

# 检查请求是否成功
if response.status_code == 200:
    # 使用BeautifulSoup解析HTML内容
    soup = BeautifulSoup(response.text, 'html.parser')
    # 56b05822a6d4647b1e9913a7d4afa07d
    # 提取数据
    print(soup)
    # 例如，提取标题
    title = soup.title.text
    print(title)
else:
    print('Failed to retrieve the webpage')
